package indi.kane.simpleproject.dao;

import indi.kane.simpleproject.entity.Account;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AccountMapper {

    @Select("SELECT id,name,password,sex,status,create_on as createdOn FROM account WHERE name=#{name} and password=#{password}")
    Account login(@Param("name") String name, @Param("password") String password);

    int deleteByPrimaryKey(Long id);

    int insert(Account record);

    int insertSelective(Account record);

    Account selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Account record);

    int updateByPrimaryKey(Account record);
}